<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
    <link
      rel="stylesheet"
      href="//at.alicdn.com/t/font_2143783_iq6z4ey5vu.css"
    />
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong
        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
        properly without JavaScript enabled. Please enable it to
        continue.</strong
      >
    </noscript>
    <div id="app"></div>
    <div id="dialog"></div>
    <!-- built files will be auto injected -->
    <script
      src="http://connect.qq.com/qc_jssdk.js"
      data-appid="100556005"
      data-redirectUrl="http://www.corho.com:8080/#/login/callback"
    ></script>
    <script>
      // 检查qq是否登录
      const res = QC.Login.check()
      console.log('检查是否登录qq', res)

      // 获取当前登录qq用户的acess_token和openid（用户唯一标识）
      if (QC.Login.check()) {
        QC.Login.getMe((openId, accessToken) => {
          console.log({ openId, accessToken })
        })
      }

      // 获取当前登录qq用户的公开信息
      if (QC.Login.check()) {
        QC.api('get_user_info').success((res) => {
          console.log(res, 'res')
        })
      }
    </script>
  </body>
</html>
